import instance from "../../utils/request";



class IndexAx{
    constructor(token="") {
        this.headers = {"Content-Type":"application/json", "Authorization": "Bearer "+token}
        this.file_headers = {"Content-Type": "multipart/form-data", "Authorization": "Bearer "+token}
    }

    getToken(data){
        return instance({
            method:"post",
            url:"/token",
            headers: this.headers,
            data:data
        })
    }

    getUserInfo(params){
        return instance({
            method:"get",
            url: "/user/register/user-info",
            params:params
        })
    }

    getUserRole(params){
        return instance({
            method: "get",
            url :"/user/info/user-roles",
            params:params
        })
    }

    testMock(data){
        return instance({
            method: "post",
            url: "/gettoken",
            headers:this.headers,
            data:data
        })
    }


}


export default IndexAx